package com.ldk.framework.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ldk.base.framework.dao.IBaseDAO;
import com.ldk.base.framework.service.impl.BaseService;
import com.ldk.framework.service.IServiceTripCrewsService;
import com.ldk.framework.dao.IServiceTripCrewsDAO;
import com.ldk.framework.entity.ServiceTripCrews;

/**
* ServiceTripCrewsService接口实现类
* @author xiangwl
*/
@Service
public class ServiceTripCrewsService extends BaseService<ServiceTripCrews> implements IServiceTripCrewsService {

	@Autowired
	private IServiceTripCrewsDAO serviceTripCrewsDAO;

	@Override
	protected IBaseDAO<ServiceTripCrews> getBaseDao() {
     	return this.serviceTripCrewsDAO;
	}

	@Override
	public int updateIn(String dbKey, ServiceTripCrews entity, List<String> crewTripNoLst) {
		if(entity == null || crewTripNoLst == null || crewTripNoLst.isEmpty())
			return 0;
		try{
			return this.serviceTripCrewsDAO.updateIn(dbKey, entity, crewTripNoLst);
		}
		catch(Exception e){
			logger.error(e.getMessage());
		}
		return 0;
	}

}
